﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebFormEditReservations.aspx.cs" Inherits="TravelAgency.WebFormEditReservations" %>
<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ContentBody" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <asp:UpdatePanel ID="UpdatePanelReservations" runat="server">
        <ContentTemplate>
            Filter by reference number:
            <asp:TextBox ID="ReferenceNumber" runat="server"></asp:TextBox>
            <asp:Button ID="ButtonFilter" runat="server" Text="Filter" 
                onclick="ButtonFilter_Click" />
            <asp:Button ID="ButtonShowAll" runat="server" Text="List all" 
                onclick="ButtonShowAll_Click" />
            <asp:GridView ID="GridViewReservations" runat="server" 
                AutoGenerateColumns="False" DataKeyNames="ReservationID" 
                onrowdatabound="GridViewReservations_RowDataBound">
                <Columns>
                    <asp:BoundField DataField="ReservationID" HeaderText="ReservationID" 
                        InsertVisible="False" ReadOnly="True" SortExpression="ReservationID" />
                    <asp:BoundField DataField="TourID" HeaderText="TourID" 
                        SortExpression="TourID" />
                    <asp:BoundField DataField="TotalPrice" HeaderText="TotalPrice" 
                        SortExpression="TotalPrice" />
                    <asp:BoundField DataField="PaidPrice" HeaderText="PaidPrice" 
                        SortExpression="PaidPrice" />
                    <asp:BoundField DataField="Reference" HeaderText="Reference" 
                        SortExpression="Reference" />
                    <asp:BoundField DataField="Discount" HeaderText="Discount" 
                        SortExpression="Discount" />
                    <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" 
                        SortExpression="CustomerID" />
                    <asp:TemplateField HeaderText=""> 
                        <ItemTemplate>
                            <asp:LinkButton ID="ButtonModify" runat="server" OnClick="ButtonModify_Click" Text="Modify"/>
                        </ItemTemplate> 
                    </asp:TemplateField>
                </Columns>
            </asp:GridView> <br />
            <asp:Label ID="LabelNoResult" runat="server" Text="no reservations found"></asp:Label>
            <div id="DivEdit" runat="server">
                Paid: <asp:TextBox ID="TextBoxPaid" runat="server"></asp:TextBox> <br />
                Discount: <asp:TextBox ID="TextBoxDiscount" runat="server"></asp:TextBox> <br />
                <asp:Label ID="ReseravationStatus" runat="server"></asp:Label> <br />
                <asp:Button ID="ButtonSave" runat="server" Text="Save" 
                    onclick="ButtonSave_Click"/>
                <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" 
                    onclick="ButtonCancel_Click"/>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
